/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    height: 100vh;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar-header h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sidebar-header i {
    margin-right: 0.5rem;
}

.provider-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.provider-section h6 {
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-select {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
}

.usage-info {
    position: absolute;
    bottom: 2rem;
    left: 1.5rem;
    right: 1.5rem;
}

/* 主内容区样式 */
.main-content {
    height: 100vh;
    overflow-y: auto;
    padding: 0;
}

.header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h2 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

/* 输入区域样式 */
.input-section {
    padding: 2rem;
    background: white;
    margin: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#promptInput {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    resize: vertical;
    min-height: 120px;
}

#promptInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 结果区域样式 */
.result-section {
    margin: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.result-section h5 {
    background: #f8f9fa;
    margin: 0;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.result-container {
    padding: 2rem;
}

.result-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.result-actions {
    margin-top: 1rem;
    text-align: right;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    border-radius: 8px;
    padding: 0.75rem 2rem;
}

.btn-outline-primary {
    border-radius: 6px;
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 文件信息样式 */
#fileInfo {
    padding: 0.5rem;
    background: #e7f3ff;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        height: auto;
        min-height: 100vh;
    }
    
    .main-content {
        height: auto;
        min-height: 100vh;
    }
    
    .input-section,
    .result-section {
        margin: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
